Chroma quantization in video coding

ABSTRACT

A method of signaling additional chroma QP offset values that are specific to quantization groups is provided, in which each quantization group explicitly specifies its own set of chroma QP offset values. Alternatively, a table of possible sets of chroma QP offset values is specified in the header area of the picture, and each quantization group uses an index to select an entry from the table for determining its own set of chroma QP offset values. The quantization group specific chroma QP offset values are then used to determine the chroma QP values for blocks within the quantization group in addition to chroma QP offset values already specified for higher levels of the video coding hierarchy.

CLAIM OF BENEFIT TO PRIOR APPLICATIONS

This present Application claims the benefit of U.S. Provisional PatentApplication 61/875,664, filed Sep. 9, 2013. U.S. Provisional PatentApplications 61/875,664 is incorporated herein by reference.

BACKGROUND

The next generation High Efficiency Video Coding (HEVC/H.265) standard,which was developed jointly by the ITU and ISO MPEG, has introducedseveral new video coding tools in an effort to improve video codingefficiency versus previous video coding standards and technologies suchas MPEG-2, MPEG-4 part2, MPEG-4 AVC/H.264, VC1, and VP8 among others. Inits first version, this new standard can support the encoding of YUV4:2:0 8 or 10 bit material using three, well defined profiles, i.e. theMain, Main 10, and Main Still Picture profiles. However, work is stillprogressing in supporting higher than 10 bit sample precision(bit-depth) as well as different color sampling formats and colorspaces, including YUV 4:2:2, YUV 4:4:4, and RGB 4:4:4 among others. Theencoding of such materials is of considerable interest primarily for usein several professional applications, such as cinema applications,capture, video editing, archiving, medical imaging etc., but also inseveral consumer applications such as screen content compression andsharing, remote computing, and gaming among others.

Until recently, existing video codecs have almost always given a muchhigher priority in coding the luma component of an image. Codingparameters that control the coding characteristics and quality of theluma information are mainly provided at lower levels of the video codinghierarchy such as slice, coding tree block, coding unit, or even thetransform block level of HEVC. Control and tuning parameters for allother components are mainly possible at a higher level such as at theSequence, Picture Parameter Set, or Slice level in conjunction with themodifications of the luma control parameters. For example, in MPEG-4AVC, luma quantization and the corresponding Quantization Parameter (QP)was controlled with a signaled parameter at the macroblock level. Asingle offset for each chroma component was provided in the PictureParameter Sets. Each chroma QP offset controls the QP value of thecorresponding chroma component in relationship to the luma QP withineach macroblock. However, this relationship is fixed for the entirepicture. If it was desired to change the quality of a luma or chromaarea, then the other components were also impacted given this very tightrelationship. In HEVC, some additional control was also provided sinceHEVC allows separate chroma quantization offset signaling for eachslice. However, using multiple slices may not be desirable or functionalfor some applications, while the control provided is still somewhatcoarse.

For some applications or content, being able to control the quality ofsome color components independently can be quite important in an attemptto improve overall quality, the compression ratio, as well as theoverall user experience. Some areas, for example, may be characterizedby different texture or noise characteristics even in the colorcomponents, while it may be important to enhance color edges, more orless so than enhancing the same information in luma. Furthermore, for4:4:4 applications such as video display sharing and remote computing,it may be desirable to encode RGB content where the importance, and thusdesired control, of the red and blue color components tends to be higherthan the chroma components in the YUV domain. It may also be desirableto encode mixed video content that is a combination of syntheticcontent, such as computer graphics or applications, with natural imagesor videos. In this scenario, given the different characteristics ofnatural versus synthetic content, as well as the possibility that thenatural content were originally 4:2:0 images up-converted for display to4:4:4, having the ability to control chroma quantization parameterscould potentially impact coding performance and subjective qualityconsiderably.

What is needed is a method that allows further control of the chromaquantization parameters compared to existing codecs, as well asextending this support for all common color formats (such as YUV, RGV,YCoCg, or YCoCg-R), all common color sampling schemes (such as 4:2:0,4:2:2, 4:4:4, or 4:4:4:4), as well as a variety of bit depths for eachcomponent. Such method should allow signaling and changing of chroma QPoffset information within a coding block in a much more flexible mannerwithout placing any limitations on color or sampling formats.

SUMMARY

In order to provide a video coding system in which chroma quantizationparameters (QP) can be more flexibly specified, some embodiments of theinvention provide a method of signaling additional chroma QP offsetvalues that are specific to quantization groups. In some embodiments,each quantization group explicitly specifies its own set of chroma QPoffset values. In some embodiments, a table of possible sets of chromaQP offset values is specified in the header area of the picture or theslice, and each quantization group uses an index to select an entry fromthe table for determining its own set of chroma QP offset values. Thequantization group level chroma QP offset values are then used todetermine the chroma QP values for blocks or sets of pixels within thequantization group. In some embodiments, the quantization group chromaQP values are used in conjunction with the luma QP of the block and thechroma QP offset values already specified at higher levels of the videocoding hierarchy.

Some embodiments associate chroma QP offset specifications withquantization groups (QGs) that include one or more video data units. Insome embodiments, each QG is associated with its own set of chroma QPoffset specifications, and in some of these embodiments, the set ofchroma QP offset specifications associated with a QG is encoded orembedded within the coding structure of a video data unit in the QG.

In order to further reduce overhead or bit usage, some embodimentsspecify all available offset values of each component, or combinationvalues of both components, in a higher level, e.g. in a sequenceparameter set (SPS), a picture parameter set (PPS), or in the currentslice header. In some of these embodiments, the higher level syntaxheader (SPS/PPS/slice header) lists the different possible offset valuesin a tabular form, each entry in the table being assigned an index.Then, at the coding unit/quantization group level, some embodimentsspecify only the index or indices of the desired quantization offsetvalues. Such offsets can be independent of the offset values specifiedat the PPS or slice header, or conversely be additive to the offsetvalues specified at the PPS or slice header. In order to reducebitstream size, some embodiments constrain the number of entries in thetable to a maximum value.

Encoders in different embodiments use different methods for selectingand assigning the additional chroma QP offset values that are specificto a quantization group. Some embodiments perform a pre-analysis step inwhich the encoder performs a region level analysis. Some embodimentsidentify different regions in an image that are of different videocontent type. In some of these embodiments, different regions withdifferent types of video content are assigned different chroma QP offsetvalues or into different quantization groups. Some embodimentsdistinguish graphics content from real video content. Some embodimentsdistinguish 4:4:4 video content that are originally coded in 4:4:4format from 4:4:4 video content that are up-sampled from 4:2:0 format.Some embodiments discern video content that may have originally been ofdifferent bit-depths. These characteristics of video content, inaddition to their relationships across color components as well as ratecontrol information, are used by some embodiments to determine thequantization levels or quantization relationships among all colorcomponents.

The preceding Summary is intended to serve as a brief introduction tosome embodiments of the invention. It is not meant to be an introductionor overview of all inventive subject matter disclosed in this document.The Detailed Description that follows and the Drawings that are referredto in the Detailed Description will further describe the embodimentsdescribed in the Summary as well as other embodiments. Accordingly, tounderstand all the embodiments described by this document, a full reviewof the Summary, Detailed Description, and the Drawings is needed.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features of the invention are set forth in the appendedclaims. However, for purpose of explanation, several embodiments of theinvention are set forth in the following figures.

FIG. 1 illustrates a hierarchical video coding structure 100 thatincludes chroma quantization groups with each having its own set ofchroma QP offset specifications.

FIGS. 2 a-c illustrates several methods for encoding a set of chroma QPoffset values for a chroma quantization group.

FIG. 3 illustrates an example picture header or picture parameter set(PPS) that specifies a definition of a chroma quantization group.

FIG. 4 illustrates an example coding tree unit that can be in a chromaquantization group.

FIG. 5 illustrates the specification of additional chroma QP offsetswithin a quantization group.

FIG. 6 illustrates the specification of additional chroma QP offsetswithin a quantization group using a different method for specifying thechroma QP offset values for the two chroma components.

FIG. 7 conceptually illustrates a process for determining chroma QPvalues from a video bitstream that allows additional chroma QP offsetspecifications.

FIG. 8 illustrates a hierarchical video coding structure that includes atable of possible chroma QP offset values at a higher level header.

FIG. 9 illustrates an example picture header or picture parameter set(PPS) that encodes a table of chroma QP offsets.

FIG. 10 illustrates a picture header that encodes each entry of a chromaQP offset table predictively.

FIG. 11 illustrates an example coding tree unit that can be in aquantization group that uses an index to retrieve chroma QP offsetvalues from a table in a picture header.

FIG. 12 illustrates a quantization group that uses an index to select anentry in a table of chroma QP offset values.

FIG. 13 conceptually illustrates a process for determining chroma QPvalues from a video bitstream that uses a table of possible chroma QPoffset values to implement additional chroma QP offset specifications.

FIG. 14 illustrates the pseudo code for a picture header that includes aselection for a method of specifying additional chroma QP offset values.

FIG. 15 illustrates the implementation of the pseudo code for atransform unit that is able to specify chroma QP offset values for aquantization group using any of three different methods.

FIG. 16 illustrates example segmentation and categorization of an image.

FIG. 17 conceptually illustrates a process 1700 for analyzing differentregions of an image and assigning chroma QP offsets accordingly.

FIG. 18 illustrates a generic video encoder.

FIG. 19 illustrates a generic video decoder.

FIG. 20 conceptually illustrates an electronic system with which someembodiments of the invention are implemented.

DETAILED DESCRIPTION

In the following description, numerous details are set forth for thepurpose of explanation. However, one of ordinary skill in the art willrealize that the invention may be practiced without the use of thesespecific details. In other instances, well-known structures and devicesare shown in block diagram form in order not to obscure the descriptionof the invention with unnecessary detail.

In order to provide a video coding system in which chroma quantizationparameters (chroma QP) can be more flexibly specified, some embodimentsof the invention provide a method of signaling additional chroma QPoffset values that are specific to quantization groups. In someembodiments, each quantization group explicitly specifies its own set ofchroma QP offset values. In some embodiments, a table of possible setsof chroma QP offset values is specified in the header area of thepicture or the slice, and each quantization group uses an index toselect an entry from the table for determining its own set of chroma QPoffset values. The quantization group level chroma QP offset values arethen used to determine the chroma QP values for blocks within thequantization group. In some embodiments, the quantization group chromaQP values are used in conjunction with the luma QP of the block and thechroma QP offset values already specified at higher levels of the videocoding hierarchy.

Section I below describes methods for specifying additional chroma QPoffset values. Specifically, Section I.a describes methods forexplicitly specifying additional chroma QP offset values in quantizationgroups, while Section I.b describes methods for specifying a table ofpossible chroma QP offset values. Section II then describes differentsystems and methods for identifying and assigning the additional chromaQP offset values to different regions of an image. Section III describesvideo encoder and decoder systems that implement some embodiments of theinvention, while Section IV describes a computer system with which someembodiments of the invention are implemented.

I. Specifying Additional Chroma QP Offsets

a. Specifying Additional Chroma QP Offsets in Quantization Groups

Some embodiments of the invention provide a method of specifying chromaquantization parameter offset values (chroma QP offsets) for coding asequence of video. The method associates chroma QP offset specificationswith chroma quantization groups, each chroma QG encompassing one or morevideo data units (such as coding units in HEVC). In some embodiments, aset of chroma QP offset specifications associated with a chromaquantization group is encoded or embedded within the coding structure ofa video data unit in the chroma quantization group. In some embodiments,the chroma QP offset specification for a chroma quantization group isapplied in addition to other chroma QP offset specifications that arespecified for a video coding structure at a higher level of the videocoding hierarchy (such as a slice or a picture) that encompasses thechroma quantization group. In some embodiments, the chroma QP offsetsfrom the different levels are applied together (by e.g., adding them tothe luma QP value) for determining the chroma quantization parameters(chroma QP).

In some embodiments, chroma quantization groups (chroma QGs) are definedin addition to luma quantization groups (luma QGs). A luma QG alsoencompasses one or more video data units, but is for specifying lumaquantization parameters (luma QPs). In some embodiments, chroma QGs mayoverlap or encompass one or more luma QGs. In other words, differentregions within a chroma QG may belong to different luma QGs andconsequently have different luma QPs.

For some embodiments of the invention, FIG. 1 illustrates a hierarchicalvideo coding structure 100 that includes chroma quantization groups(chroma QGs) with each having its own set of chroma QP offsetspecifications. The hierarchical video coding structure 100 includesseveral pictures 101-103. Among these, the picture 102 includes severalslices 111-113. The slice 112 includes several chroma QGs 121-123. Thepicture 102 has a picture parameter set (PPS) 132 that includes a set ofchroma QP offset specifications. The chroma QGs 121-123 are associatedwith chroma QP offset sets 141-143, respectively.

The hierarchical video coding structure 100 corresponds to a sequence ofvideo images. A sequence of video images is organized into layers ofvideo data units at various levels of the hierarchy, where a video dataunit at a higher level encompasses one or more video data units at lowerlevels. For example, a group of pictures (GOP) is a video data unit at ahigher level of the hierarchy than a picture, a picture is a video dataunit at a higher level of the hierarchy than a slice of the picture, aslice is video data unit at a higher level of the hierarchy than acoding tree unit, and so forth. In some embodiments, at least someparameters specified for a higher level video data unit are applicableto lower level video data units that the higher level video data unitencompasses. For example, in some embodiments, the picture level chromaQP offset specification for the picture 102 (from PPS 132) is applicableto all chroma QGs encompassed by the picture 102 (e.g., chroma QGs121-123).

The video coding structure 100 is encoded as a bitstream in someembodiments. Such a bitstream is based on an established video codingformat such as the HEVC/H.265 standard or MPEG-4 AVC/H.264 standard. Apicture under the H.265 standard can include one or more slices, andeach slice can have one of more coding tree units (CTUs). Further, eachCTU can be sub-divided into blocks. H.265 also allows the definition ofluma quantization groups for quantizing/de-quantizing luma components.Each quantization group allows the derivation of a luma quantizationparameter that is specific to the video data units within thequantization group. Once derived, the luma quantization parameter isthen used to perform quantization of luma DCT coefficients. Under theH.265 standard, chroma quantization parameters are derived from lumaquantization parameters based on offset values provided in the pictureor slice layer of an H.265 compliant bitstream. The video codingstructure 100 provides chroma QP offset signaling or specification thatis in addition to the picture/slice layer chroma QP offsets allowed bythe H.265 standard.

The chroma QGs 141-143 are defined ranges in the video coding structure100. Each of the QGs 141-143 is associated with its own set of chroma QPoffset values 141-143. In some embodiments, a quantization group can bea group of video data units that share a same set of QP values. In someembodiments, the signaling for chroma QP offsets in a QG is applied toall video data units within the QG. In some embodiments, the QP offsetsare applied starting from the first signaled chroma residual informationonward. Any areas preceding the signaling are not associated with thesignaled chroma QP offset. In other words, the QG may be “fragmented”.

In some embodiment, a QG (chroma or luma) can be defined at differentlevels or depths of the video coding hierarchy such as coding tree unit,coding unit or transform unit, as these are supported in HEVC. In someembodiments, the definition of a QG for chroma QP offset inherits thedefinition of a QG for luma components when available.

In some embodiments, the depth, level, and size of a QG (chroma or luma)can be flexibly specified in the bitstream, and may vary from picture topicture. For example, one picture (e.g., 101) can specify its chroma QGsto be at the top level of a coding quad tree (i.e., a QG is a CTU),while another picture (e.g., 103) can specify its chroma QGs to be at alower level of a coding quad tree (e.g., a QG is a coding block of aquad tree). In some embodiments, higher level parameters (such as a PPSor a slice header) specify at which level of the video coding hierarchyis the QGs of a picture to be defined.

FIG. 1 also illustrates how offsets specified by chroma QGs are used tocompute chroma QP values. In some embodiments such as those illustratedby FIG. 1, a first set of Chroma QP offset parameters is alreadysignaled at the PPS 132 (and/or header for slice 112). In someembodiments, chroma QP offset values that are specified at levels abovechroma QGs (e.g., PPS and/or slice header) are ignored when the QGsspecify their own chroma QP offset values. In some embodiments, thehigher level chroma QP offset syntax elements and the QG level chroma QPoffsets are considered together to reduce overhead. That is, theadaptation of chroma QP values is done in relationship to both parametersets together, and the signaled information can be seen as a“second-order” offset. In some of these embodiments, the chroma QPvalues for the current chroma QG is computed as:

QPchroma[i]=QPluma+QPoffset_(—) pps[i]+QPoffset_quant_group[i]  (1)

(i=0 for the first chroma component; i=1 for the second chromacomponent)

Where QPluma is the QP of the luma component corresponding to thecurrent chroma quantization group, QPoffset_pps[i] is the i-th chromacomponent's QP offset from the current PPS (or slice header), andQPoffset_quant_group[i] is the additional offset signaled at the QGlevel for that component. QPoffset_pps[i]+QPoffset_quant_group[i] thusconstitute the overall chroma QP offset of the i-th chroma component.

In some embodiments, the adaptation of chroma QP values is based onchroma QP offset parameters from multiple levels of the video codinghierarchy. For example, in some embodiments, the computation of thechroma QP values considers chroma QP offset values from the PPS as wellas from the slice header. In some of these embodiments, the chroma QPvalue for chroma component i of the current QG is computed as:

QPchroma[i]=QPluma+QPoffset_(—)pps[i]+QP_offset_slice[i]+QPoffset_quant_group[i]  (2)

Where QPoffset slice[i] is the i-th chroma component's QP offset fromthe current slice header, QPoffset_pps[i] is the i-th chroma component'sQP offset from the current PPS, and the sum QPoffset_pps[i]+QPoffsetslice[i]+QPoffset_quant_group[i] is the overall chroma QP offset of thei-th chroma component. Some embodiments optionally allow one or moreadditional chroma QP offset values to be specified in other layers ofthe video coding hierarchy. To encode or decode a particular codingblock, some of these embodiments use some or all of the chroma offset QPvalues specified along the levels of the video coding hierarchy thatencompass (or are applicable to) the particular coding block.

As mentioned, chroma QP values of a chroma QG are computed by addingchroma QP offsets to the luma QP value applicable to the chroma QG. Insome embodiments, the luma QP value corresponding to a chroma QG maychange within a chroma QG. This is because luma QGs and chroma QGs mayoverlap such that a chroma QG may encompass coding units that fall intodifferent luma QGs and thus have different luma QP values. Consequently,different coding units within a chroma QG may end up having differentchroma QP values (since the chroma QP offsets applicable to the chromaQG are applied to different luma QP values within the chroma QG).

In the example of FIG. 1, the chroma QG 121 has four corresponding lumaQP values (QPLuma), because the chroma QG 121 overlaps with fourdifferent luma QGs 171-174. These four luma QP values of the chroma QG121 results in four possible chroma QP values after applying the chromaQP offsets (QPoffset_pps, QPoffset slice, QPoffset_quant_group) from thePPS offset 132 and QG1 offset 141. A coding unit in the chroma QG 121therefore can have one of these four possible chroma QP values,depending on the underlying luma QG that the coding unit falls into.Likewise, the chroma QG 123 overlaps with two different luma QGs181-182, and a coding unit in the chroma QG 123 can have one of twopossible chroma QP values depending on the underlying luma QG that thecoding unit falls into.

On the other hand, the chroma QG 122 has only one corresponding luma QPvalue, because the chroma QG 122 falls completely within a luma QG 175(or encompasses the exact same set of coding units as the luma QG 175).Consequently the coding units in the chroma QG 122 all have the samechroma QP value after applying the chroma QP offsets.

Since there are two chroma components for each luma component for mostvideo coding formats (e.g., YCbCr), in some embodiments, each chroma QPoffset for a quantization group is a set of values that includesspecification for computing two offset values for the two chromacomponents. For some embodiments, FIGS. 2 a-c illustrates severalmethods for encoding a set of offset values for the QG 141 of FIG. 1.Some embodiments use only one of these methods for encoding a set ofchroma QP offset values. Some embodiments select different methods fordifferent QGs based on QG-specific characteristics.

FIG. 2 a illustrates the set of chroma QP offset values as twoindependent offset values 241 and 242. These two values are directlyused as chroma QP offset for component [0] (251) and for component [1](252). Some embodiments select this method of encoding chroma QP offsetwhen the two chroma components have very little correlation with eachother. A further example of this method of encoding chroma QP offsetvalues is described further below by reference to FIG. 5.

FIG. 2 b illustrates the set of offset values encoded as one singlevalue 243 that is simultaneously used as the chroma QP offset by bothchroma components (253 and 254). Some embodiments select this methodwhen the two chroma components are very similar in their relationshipsto the luma component. A further example of this method of encodingchroma QP offset values is described further below by reference to FIG.6.

FIG. 2 c illustrates the set of offset values encoded as an immediateoffset value 244 and a delta value 245 based on the immediate offset. Inthis example, the immediate offset value 244 is directly applied as thechroma QP offset of the first chroma component (255) while the sum ofthe delta value 245 and the immediate value 244 is used as the chroma QPoffset value of the second chroma component (256). Some embodimentsselect this method when the two chroma components differ in theirrelationships to the luma component by a small offset that can becheaply encoded in the bitstream with very few bits. This method encodesthe second chroma QP offset (for component [1]) in relationship to thefirst chroma QP offset. That is, the second chroma QP offset is nowpredicted from the first chroma QP offset (for component [0]). In someembodiments, the chroma QP value for the first chroma component iscomputed as:

QPchroma[0]=QPluma+QPoffset_(—) pps[0]+QPoffset_quant_group[0].   (3)

The chroma QP value for the second chroma component is computed as:

QPchroma[1]=QPluma+QPoffset_(—) pps[1]+QPoffset_quant_group[0]+QPoffset_quant_group[1].   (4)

(i=0 for the first chroma component; i=1 for the second chromacomponent)

As mentioned, some embodiments use chroma QP offset values from multipledifferent layers of the video coding hierarchy for deriving the finalchroma QP value. For some embodiments that use chroma QP offset valuesfrom both the PPS and the slice header, the chroma QP value for thefirst chroma component is computed as:

QPchroma[0]=QPluma+QPoffset_(—) pps[0]+QPoffset_slice[0]+QPoffset_quant_group[0].   (5)

The chroma QP value for the second chroma component is computed as:

QPchroma[1]=QPluma+QPoffset_(—) pps[1]+QPoffset_slice[1]+QPoffset_quant_group[0]+QPoffset_quant_group[1].  (6)

As mentioned, in some embodiments, the definition of a luma and/orchroma quantization group is specified by parameters that are in thepicture level. FIG. 3 illustrates an example picture header or PPS 300that specifies a definition of a chroma quantization group. The examplepicture header 300 is associated with the picture 102 of the videocoding structure 100. The picture header 300 is described by pseudo codethat is modified from the H.265 standard in order to accommodateadditional chroma QP offsets (i.e., the adaptation of chroma QP values).In some embodiments, a pseudo code for a video standard (such as theH.265 standard or a modified standard) describes the operations that arerequired of a video decoder when processing a bitstream that is incompliance with the video standard. A pseudo code also describes theoperations that are required of a video encoder when generating abitstream that is in compliance with the video standard.

For illustrative purposes, the pseudo code of the picture header 300 isshown in FIG. 3 with darkened lines 311-313. Lines 311-313 allowsadditional chroma QP offset values and defines chroma quantizationgroups for chroma QP offsets in the picture 102. Specifically, theparameter “additional_chroma_qp_offset” in line 311 informs the decoderthat there will be additional chroma QP offset specification in thebitstream. When this variable is not set for a particular picture, thebitstream would not include bits for specifying the additional chroma QPoffset for the picture in order to avoid wasting bits.

The parameter “chroma_qp_offset_max_depth” in the line 313 defines thelevel (and hence the size or the hierarchical depth) of the chroma QG.This parameter can be set to be equal to the size of the entire codingtree unit (CTU) or down to the size of the smallest coding unit possiblein the bitstream. Some embodiments allow the specification and signalingof additional chroma QP offsets to occur at any desirable level (e.g.,at the CTU level, chroma defined quantization group level, coding unitlevel, transform unit level, etc.)

In some embodiments, instead of defining quantization groupsspecifically for chroma QP offsets, the bitstream uses the parameter“diff_cu_qp_delta_depth”, which also defines the quantization groups forluma QPs. In some embodiments, if the parameter for defining aquantization group is not available, then the entire picture is assignedthe same QP for luma and no QP adaptations for luma are permitted.

FIG. 4 illustrates an example coding tree unit 400 that can be in aquantization group. The coding tree unit 400 is described by pseudo codemodified from the H.265 pseudo code in order to accommodate additionalchroma QP offsets. The coding tree unit 400 is in the quantization group122, which is in the slice 112 of the picture 102.

The pseudo code for the coding tree unit 400 is illustrated withdarkened lines 411-413, which are added for the purpose of determiningwhether the coding tree unit is part of a QG. Specifically, at line 411,the parameter “additional_chroma_qp_offset” (e.g., from the pictureheader 300) is used to indicate whether additional chroma information isallowed. The parameter “chroma_qp_offset_max_depth” is compared againsta variable “log2CbSize” for determining whether the coding tree unit 400is in a quantization group (such as the quantization group 122). If so,the pseudo code sets the variable “IsCrCuQpOffsetCoded” to 0 at line412. For some embodiments, this also initializes the starting point ofthe chroma quantization group.

FIG. 5 illustrates the specification of additional chroma QP offsetswithin the QG 122. As discussed above by reference by FIGS. 3 and 4, theQG 122 has been defined by the picture header 300 to include the codingtree unit 400. The additional chroma QP offsets are specified within atransform unit 500 of the coding tree unit 400. The transform unit 500is described by pseudo code modified from the H.265 pseudo code in orderto accommodate additional chroma QP offsets.

The pseudo code for the transform unit 500 is illustrated with darkenedlines 511-519, which are added for the purpose of specifying additionalchroma QP offsets. Specifically, at line 511, the parameter“additional_chroma_qp_offset” is used to indicate whether additionalchroma information is allowed. The variable “IsCrCuQpOffsetCoded” isused to indicate whether it is necessary to specify (or receive) chromaQP offset information at the transform unit 500. If the chroma QP offsetvalues for the QG 122 have already been coded, there is no need tospecify chroma QP offset values again.

If the QG 122 has not already coded a set of chroma QP offset values(i.e., if the variable “IsCrCuQpOffsetCoded” is 0), the transform unit500 at lines 512-517 specifies chroma QP offset values for the twochroma components. In this instance, the transform unit specifies theset of chroma QP offsets as two independent signed values, with eachsigned value signaled using a magnitude (“cu_chroma_cmp0_qp_offset_abs”or “cu_chroma_cmp1_qp_offset_abs”) and a sign flag(“cu_chroma_cmp0_qp_delta_sign_flag” and“cu_chroma_cmp0_qp_delta_sign_flag”). The pseudo code then sets thevariable “IsCrCuQpOffsetCoded” to 1, indicating that the chroma QPoffset values of this quantization group have already been specified.

As mentioned earlier by reference to FIGS. 2 a-2 b, quantization groupsin different embodiments specify the chroma QP offset values for the twochroma components differently. FIG. 6 illustrates the specification ofadditional chroma QP offsets within the QG 122 using a different methodfor specifying the chroma QP offset values for the two chromacomponents. FIG. 6 illustrates a transform unit 600 that is described bypseudo code similar to those for the transform unit 500, the onlydifference being that lines 611-616 specify only one chroma QP offsetvalue (magnitude+sign) for both chroma components. In some embodiments,specifying one chroma QP offset value for both chroma components issufficient since in most cases the importance of the two colorcomponents might not change. The signaling of one or two such parameterscan be prefixed, or could be signaled at different higher syntax levellocations such as the SPS, PPS, or slice header.

For some embodiments, FIG. 7 conceptually illustrates a process 700 fordetermining chroma QP values from a video bitstream that allowsadditional chroma QP offset specifications. In some embodiments, theprocess 700 is performed by a video decoder, which uses this process toperform de-quantization of chroma components when decoding the videobitstream for display. In some embodiments, the process starts when thedecoder has received a video bitstream and starts to decode a particularvideo picture for display or other purposes.

At 705, the process 700 processes parameters in picture header or PPS ofthe particular video picture. As discussed above by reference to FIG. 3,in some embodiments, the picture header or PPS of a video pictureincludes flags (e.g., “additional_chroma_qp_offset”) for determiningwhether additional chroma QP offsets are allowed for the video picture.The picture header or PPS also identifies the layer of the videohierarchy in which the chroma quantization groups for the additionalchroma QP offsets will be defined (e.g., by setting the variable“chroma_qp_offset_max_depth”).

Next, the process identifies (at 710) higher level chroma QP offsetvalues. In some embodiments, this higher level chroma QP offset valuesare picture level offsets encoded in the picture header (or as a part ofthe PPS). In some embodiments, this higher level chroma QP offset valuesare slice level offsets encoded in the slice header. Some embodimentsidentify multiple higher level chroma QP offset values, including bothpicture level and slice level.

The process then determines (at 720) whether additional chroma QPoffsets are allowed or available for this particular video pictureand/or slice. If additional chroma QP offsets are not available, theprocess proceeds to 750. If additional chroma QP offsets are available,the process proceeds to 730.

At 730, the process determines whether it has reached the start of achroma quantization group. In some embodiments, the process examineswhether it is at the level of the video hierarchy that has beenidentified as a chroma quantization group. If the process is not at thestart of a chroma quantization group (e.g., is already inside a chromaquantization group), the process proceeds to 750. If the process is atthe start of a chroma quantization group, the process proceeds to 740.Examples of operations 720 and 730 are discussed by reference to FIG. 4above.

At 740, the process identifies the chroma QP offset values for thechroma quantization group. In some embodiments, chroma QP offsets areencoded explicitly within the chroma quantization groups as discussedabove by reference to FIGS. 5 and 6.

The process then identifies (at 750) luma QP value(s) for the chromaquantization group. As mentioned, in some embodiments, luma QP valuesare set according to luma quantization groups, which may or may not bethe same as chroma quantization groups. Depending on signaling, therecan be more or fewer luma quantization groups than chroma quantizationgroups. In some embodiments, a luma quantization group may containmultiple chroma quantization groups or vice versa. In some embodiments,chroma quantization groups and luma quantization groups may overlap eachother. Consequently, different coding units in the same chromaquantization group may have different luma QP values based on lumaquantization groups.

Next, the process computes (at 760) chroma QP values. For a decoder,some embodiments compute the chroma QP value from the identified luma QPvalues and from each identified chroma QP offset. In some embodiments,this is accomplished by adding the luma QP value with all of theidentified chroma QP offsets (from the slice/picture level and from theQG level) as illustrated above in Equations (1)-(6).

The process then determines (at 770) whether it has reached the end ofthe picture (if the higher level chroma QP offset is for the entirepicture) or it has reached the end of the slice (if the higher levelchroma QP offset is for the slice). If so, the process 700 ends. If not,the process 700 returns to 730 to process the next quantization group.

As shown above by reference to FIGS. 1-6, the chroma QP values are codedpredictively by using offsets from the luma QP values. Furthermore, insome embodiments, the offset values are themselves predictively encodedby offsetting from each other, such as QG level offsets being offsetsfrom slice and/or picture level offsets, and/or the offset values of onechroma component being encoded as offsets from another chroma component.In some embodiments, the chroma QP offsets are further predicted fromchroma values or offsets of neighboring coding units or blocks, or fromchroma values or offsets of a collocated coding unit or block in aneighboring video picture, as they are most likely sufficiently similarto the coding units or blocks of the current chroma quantization group.Some embodiments do not perform prediction for at least some of thequantization groups. In these instances, chroma QP values are encodedexplicitly (not as offsets) such that the QP parameters of the lumacomponent are ignored (because there is no need to offset from luma).

Some embodiments use a flag to indicate that a set of chroma QP offsetvalues from a neighboring quantization group will be used for thecurrent quantization group. In some embodiments, this neighboringquantization group is spatially located at the left or at the top of thecurrent quantization group. For example, some embodiments use a flag“cu_qp_update_signal” for indicating whether the chroma QP offset valuesof a neighboring quantization group will be used. In some embodiments,the flag “cu_qp_update_signal” is signaled before the“cu_chroma_qp_offset_abs” parameter at line 612 of FIG. 6.

If the flag is ‘1’, the current quantization group will provide anupdate for specifying its own chroma QP offset values. If the flag is‘0’, the current quantization group will not update its set of chroma QPoffset values, but rather inherit its chroma QP offset values from thelast specified set of chroma QP offset values (e.g., from theneighboring quantization group at the left) or another previouslyspecified chroma QP offset values (e.g., from the neighboringquantization group at the top, or another neighboring quantizationgroup). If the neighboring chroma QP offset values are not available,some embodiments then use the default QP offset values from the PPSand/or the slice header.

In some embodiments, the flag “cu_qp_update_signal” can take onadditional possible values for handling different options for specifyingchroma QP offset values. For example, in some embodiments, if the flagis ‘0’, the chroma QP offset values from the left neighboringquantization group are used; if the flag is ‘1’, the chroma QP offsetvalues from the top neighboring quantization group are used; and if theflag is ‘2’, the current quantization group will explicitly specify anew set of chroma QP offset values. Otherwise, the current quantizationgroup will use the default QP offset values from the PPS and/or theslice header. In some embodiments, the chroma QP offset values inheritedby the current quantization group are based on the average of the chromaQP offset values of at least two of the neighboring quantization groups(e.g., the left and the top).

To further reduce overhead, some embodiments specify that theseadditional chroma QP offsets can only be within a small range of values,i.e. from a value −x to x. Doing so changes the entropy coding processsince it alters the expected statistics of the information to besignaled (i.e. for Context Adaptive Binary Arithmetic (CABAC) coding, orif using a “max-limited” universal variable length coding scheme). Insome embodiments, the value of x (i.e., the range) is prefixed for theentire sequence; or is signaled at a higher syntax level such as thePPS, SPS, or slice header. Some of these embodiments accomplish this byspecifying x directly, or, if x corresponds to a power of 2, the valuelog 2(x). Some embodiments specify x by separating magnitude, i.e.abs(x), and the sign of x. In CABAC, the value of abs(x) corresponds tothe cMax parameter needed in the binarization process.

b. Specifying Additional Chroma QP Offsets in a Table

In order to further reduce overhead or bit usage, some embodimentsspecify all possible offset values of each component, or combinationvalues of both components at a higher level syntax, e.g. in sequenceparameter set (SPS), picture parameter set (PPS), or in the currentslice header. In some of these embodiments, the higher level header(SPS/PPS/slice header) lists the different possible offset values in atabular form, each entry in the table being assigned an index. Then, atthe coding unit/quantization group level, some embodiments specify onlythe index or indices of the desired quantization offset values. Suchoffsets can be independent of the offset values specified at the PPS orslice header, or conversely be additive to the offsets values specifiedat the PPS or slice header. In order to reduce bitstream size, someembodiments constrain the number of entries in the table to a maximumvalue.

FIG. 8 illustrates a hierarchical video coding structure 800 thatincludes a table 890 of possible chroma QP offset values encoded at ahigher level header. A chroma QG at a lower level of the video codingstructure then uses an index to select one of the possible chroma QPoffset values from the table 890 for computing the chroma QP values. Thevideo coding structure 800 is similar to the video coding structure 100.The video coding structure 800 includes several pictures 801-803. Amongthese, the picture 802 includes several slices 811-812. The slice 811includes several chroma QGs 821-823. The picture 802 has a pictureparameter set (PPS) 831 that includes a set of chroma QP offsetspecifications that is applicable to all chroma QGs encompassed by thepicture 802. As mentioned above by reference to FIG. 1 as well asequations (1) and (2), some embodiments also specify slice level chromaQP offset (not illustrated), and that the adaptation of chroma QP valuesis based on chroma QP offset parameters from multiple levels of thevideo coding hierarchy. Unlike the chroma QGs 121-123 of FIG. 1 thatspecify their own set of chroma QP offset values, each of the chroma QGs821-823 selects a set of chroma QP offset values from the table 890.

The table 890 is an array that includes multiple entries. Each entrycontains a set of chroma QP offsets that can be selected by any of thequantization groups in the picture. In this example, the table 890includes entries 891-895, which correspond to chroma QP offset sets A,B, C, D, and E, respectively. In some embodiments, each one of theentries can be selected by any number of quantization groups or by noneat all. In the example of FIG. 8, both QGs 822 and 823 selects chroma QPoffset set A (891), while the QG 821 selects the chroma QP offset set C(893). In some embodiments, the encoder decides which chroma QP offsetsets to include and how many chroma QP offset sets to include in thetable in order to minimize bitrate.

Once the set of chroma QP offset values has been identified from thetable 890, the computation of chroma quantization parameters is similarto that of FIG. 1. In the example of FIG. 8, the luma QP values 851(from four luma QGs overlapping the chroma QG 821) are applicable to thechroma QG 821, the luma QP value 852 (from a same luma QG) is applicableto the chroma QG 822, and the luma QP values 853 (from two luma QGsoverlapping the chroma QG 823) is applicable to QG 823. Adding the lumaQP values 851, the chroma QP offset 831 (for the picture 802 and/or forslice 811), and the chroma QP offset C (retrieved from table entry 893for QG 821) yields chroma QP values 861 for the QG 821. Adding the lumaQP values 852, the chroma QP offset 831, and the chroma QP offset A(retrieved from table entry 891) yields chroma QP values 862 for the QG822. Adding the luma QP values 853, the chroma QP offset 831, and thechroma QP offset A (retrieved from table entry 891) yields chroma QPvalues 863 for the QG 823.

In some embodiments, the table of chroma QP offsets is encoded withinthe header area of an encoded video picture. FIG. 9 illustrates anexample picture header or PPS 900 that encodes the table 890. Thepicture header 900 is described by pseudo code that is modified from theH.265 standard in order to accommodate additional chroma QP offsets.

The pseudo code for the picture header 900 is illustrated with darkenedlines 911-917, which are added for the purpose of defining quantizationgroups for chroma QP offsets as well as encoding the table 890.Specifically, the parameter “additional_chroma_qp_offset” in line 911informs the decoder that there will be additional chroma QP offsetspecifications for the picture 802, and the parameter“chroma_qp_offset_max_depth” in the line 913 defines the level (andhence the size or the hierarchical depth) for QGs in the picture 802.Lines 914-916 of the pseudo code then define a set of chroma QP offsetvalues for each entry (891-895) of the table 890. As illustrated, eachentry of the table is assigned a chroma QP offset value for a firstcomponent (“chroma_cmp0_qp_offset[k]”) and a chroma QP offset value fora second component (“chroma_cmp1_qp_offset[k]”).

Since the two chroma components for each entry of the chroma QP offsettable are likely correlated, some embodiments use the chroma QP offsetvalue of one chroma component to predict the chroma QP offset value ofthe other chroma component. In other words, for the k-th entry in thetable, if chroma_cmp0_qp_offset[k] represents the offset value of thefirst chroma component and chroma_cmp1_qp_offset[k] represents theoffset value of the second chroma component, then the chroma QP offsetfor the second chroma component of the k-th entry is computed as:

chroma_(—) cmp1_(—) qp_offset[k]=chroma_(—) cmp0_(—)qp_offset[k]+delta_chroma_cmp1_(—) qp_offset[k]  (7)

That is, instead of sending the full offset parameter, i.e.chroma_cmp1_qp_offset[k], some embodiments send a delta parameter, i.e.delta_chroma_cmp1_qp_offset[k] for computing the offset for the secondchroma QP offset chroma_cmp1_qp_offset[k]. FIG. 10 illustrates a pictureheader 1000 that encodes each entry (891-895) of the chroma QP offsettable 890 (at lines 1015 and 1016) as chroma_cmp0_qp_offset[k] anddelta_chroma_cmp1_qp_offset[k] according to equation (7).

There are other possible methods of predictively encoding the chroma QPoffset table in order to reduce bit usage. For example, in someembodiments, the chroma QP offset table entries are predictively codedwith respect to each other, such that all of the entries except one arepredicted from other entries. One example is to encode each successiveentry in the table after the first entry as a delta value predicted froma previous entry in the table. In some embodiments, the first entry isan explicit QP. In some embodiments, the first entry is itself anoffset, and therefore is itself also a delta.

FIG. 11 illustrates an example coding tree unit 1100 that can be in aquantization group that uses chroma QP offset values from a table in thepicture header. The coding tree unit 1100 is described by pseudo codemodified from the H.265 pseudo code in order to accommodate additionalchroma QP offsets. The coding tree unit 1100 is in the quantizationgroup 821 of the slice 811. The slice 811 is in the picture 802, whoseheader or PPS includes the table 890. The pseudo code for the codingtree unit 1100 is identical to the pseudo code for the coding tree unit400 of FIG. 4, since in some embodiments, there is no difference betweena coding tree unit in a quantization group that embeds chroma QP offsetvalues explicitly and a coding tree unit in a quantization group thatuses a set of chroma QP offset values from a table.

The pseudo code for the coding tree unit 1100 is illustrated withdarkened lines 1111-1113, which are added for the purpose of determiningwhether the coding tree unit is part of a QG. Specifically, at line1111, the parameter “additional_chroma_qp_offset” is used to indicatewhether additional chroma information is allowed. The parameter“chroma_qp_offset_max_depth” is compared against a variable “log2CbSize”for determining whether the coding tree unit 1100 is in a chromaquantization group. For some embodiments, this also initializes thestarting point of the chroma quantization group.

FIG. 12 illustrates a quantization group that uses an index to select anentry in a table of chroma QP offset values. As discussed above, thequantization group 821 includes the coding tree unit 1100, which in turnincludes a transform unit 1200. The transform unit 1200 is described inFIG. 12 by pseudo code modified from the H.265 pseudo code in order toaccommodate additional chroma QP offsets.

The pseudo code for the transform unit 1200 is illustrated with darkenedlines 1211-1214, which are added for the purpose of specifying theadditional chroma QP offsets. Specifically, at line 1211, the parameter“additional_chroma_qp_offset” is used to indicate whether additionalchroma information is allowed. The variable “IsCrCuQpOffsetCoded” isused to indicate whether it is necessary to specify (or receive) chromaQP offset information at the transform unit 1200. If the chroma QPoffset values for the QG 821 have already been coded, there is no needto specify chroma QP offset values again. If the QG 821 has not alreadycoded a set of chroma QP offset values (i.e., if the variable“IsCrCuQpOffsetCoded” is 0), the transform unit 1200 at lines 1212specifies an index “cu_chroma_qp_offset_table_index” for selecting anentry from the table 890. For this example, the index value is set toselect the chroma QP offset values contained in entry C (893) of thetable 890.

For some embodiments, FIG. 13 conceptually illustrates a process 1300for determining chroma QP values from a video bitstream that uses atable of possible chroma QP offset values to implement additional chromaQP offset specifications. In some embodiments, the process 1300 isperformed by a video decoder, which uses this process to performde-quantization of chroma components when decoding the video bitstreamfor display or other purposes. In some embodiments, the process 1300starts when the decoder has received a video bitstream and starts todecode a particular video picture in some embodiments.

At 1305, the process 1300 processes parameters in picture header or PPSof the particular video picture. In some embodiments, picture headerincludes flags for determining whether additional chroma QP offsets areallowed for the video picture. The picture header also includesparameters for identifying the layer of the video hierarchy in which thequantization groups for the additional chroma QP offsets will bedefined.

Next, the process identifies (at 1310) higher level chroma QP offsetvalues. In some embodiments, this higher level chroma QP offset valuesare picture level offsets encoded in the picture header (or as a part ofthe PPS). In some embodiments, this higher level chroma QP offset valuesare slice level offsets encoded in the slice header. Some embodimentsidentify multiple higher level chroma QP offset values, including bothpicture level and slice level.

The process then determines (at 1320) whether additional chroma QPoffsets are allowed or available for this particular video picture orslice. If additional chroma QP offsets are not available, the processproceeds to 1350. If additional chroma QP offsets are available, theprocess proceeds to 1325 to receive chroma QP offset table entries fromthe bitstream.

Next, the process determines (at 1330) whether it has reached the startof a quantization group. In some embodiments, the process examineswhether it is at the level of the video hierarchy that has beenidentified as a quantization group. If the process is not at the startof a quantization group (e.g., is already inside a QG), the processproceeds to 1350. If the process is at the start of quantization group,the process proceeds to 1335.

At 1335, the process determines whether there are any residual chromacoefficients to encode. In some embodiments, if there are no residualchroma coefficients then the offsets (or their associated indices) arenever signaled. Signaling starts when the first non-zero transformcoefficient for a chroma block is encountered and the chroma QP offsetsbecome active from that point forward and until the end of chromaquantization group. The chroma QP offsets are 0 until the first non-zerotransform coefficient of the chroma block is encountered (hence a regionwith no chroma coefficients would not have any chroma QP offsetssignaling). If there is residual chroma coefficient to encode, theprocess proceeds to 1340. Otherwise the process proceeds to 1350.

At 1340, the process selects one of the entries in the chroma QP offsettable as containing the set of chroma QP offset values for thequantization group. In some embodiments, this operation entailsreceiving an index from the bitstream and using the received index toselect an entry from the chroma QP offset table. In some embodimentsthat predictively encode the chroma QP offset values in the table, thisprocess includes restoring the chroma QP offset values (of both chromacomponents) from the prediction or delta values.

The process then identifies (at 1350) luma QP values for thequantization group. As mentioned, in some embodiments, the luma QPvalues are defined for a quantization group that is the same for thechroma QP values. In some embodiments, quantization groups for luma QPand chroma QP are defined independently.

Next, the process computes (at 1360) chroma QP values. Some embodimentscompute the chroma QP value from the identified luma QP values and fromeach identified chroma QP offset. In some embodiments, this isaccomplished by adding the luma QP value with all of the identifiedchroma QP offsets (from the slice/picture level and from the QG level)as illustrated above in Equations (1)-(6).

The process then determines (at 1370) whether it has reached the end ofthe picture (if the higher level chroma QP offset is for the entirepicture) or it has reached the end of the slice (if the higher levelchroma QP offset is for the slice). If so, the process 1300 ends. Ifnot, the process 1300 returns to 1330 to process the next quantizationgroup.

FIGS. 5, 6, and 12 have introduced several different methods that aquantization group can use to specify a set of chroma QP offset values.In some embodiments, quantization groups in different pictures or slicesmay use different methods for specifying chroma QP offset values. Anencoder in some of these embodiments selects the best method that itthinks is needed for the current picture or slice in order to achievehigher flexibility or reduce coding overhead.

For some embodiments, FIG. 14 illustrates the pseudo code for a pictureheader 1400 that includes a selection for a method of specifyingadditional chroma QP offset values. The picture header 1400 is similarto the picture header 900 in that it includes flags“additional_chroma_qp_offset” (at line 1411) and“chroma_qp_offset_max_depth” (at line 1413). The picture header 1400also includes the entries of the chroma QP offset table 890 (at lines1415-1417). However, unlike the picture header 900, the picture header1400 also specifies a method by setting “chroma_qp_offset_method” (atline 1414).

FIG. 15 illustrates the implementation of the pseudo code for atransform unit 1500 that is able to specify chroma QP offset values fora quantization group using any of three different methods. When themethod flag “chroma_qp_offset_method” is set to 0 (at line 1512), thetransform unit 1500 uses the index “cu_chroma_qp_offset_table_index” toselect an entry from the table 890 for computing chroma QP offset valuesof QG 821 as in FIG. 12. When the method flag is set to 1 (at line1514), the transform unit 1500 encodes two independent chroma QP offsetvalues for two chroma components (using both magnitude and sign flags)as in FIG. 5. When the method flag is set to 2 (at line 1522), thetransform unit 1500 encodes only one chroma QP offset value for bothchroma components as in FIG. 6.

II. Assigning Additional Chroma QP Offsets

Encoders in different embodiments use different methods for identifyingand assigning the additional chroma QP offset values. In someembodiments, the encoder analyzes images in a video sequence in order toidentify the most suitable QP values for quantization (e.g., foroptimally balancing quality and bitrate). Some embodiments analyzevarious regions of the image in order to identify quantization groupsthat can be optimally encoded by a common set of chroma QP values.

Some embodiments perform a pre-analysis step in which the encoderperforms a region level analysis (e.g. for every N×M block with, forexample, N=M=4, or an analysis based on object segmentation) to extractfor each color component in that region the intensity (e.g. mean value,or lightness for luma and saturation for color), hue,variance/activity/texture characteristics, noise characteristics, andmotion characteristics (e.g. motion vector and/or prediction distortionvalue).

Since video contents of different types can be combined into a samevideo stream or even a same video image, some embodiments identifydifferent regions in an image that are of different types of videocontent. In some of these embodiments, different regions with differenttypes of video content are assigned different chroma QP offset values orinto different quantization groups. Some embodiments distinguishgraphics content from real video content. Some embodiments distinguish4:4:4 video content that are originally coded in 4:4:4 format from 4:4:4video content that are up-sampled from 4:2:0 format. Some embodimentsdiscern video content that may have originally been of differentbit-depths. These characteristics of video content, in addition to theirrelationships across color components as well as rate controlinformation, are used by some embodiments to determine the quantizationlevels or quantization relationships among all color components.

FIG. 16 illustrates example segmentation and categorization of an image1600. The image is divided into coding tree units, and each coding treeunit is sub-divided into coding units. The various coding units of theimage 1600 are divided into four different chroma QP offset groups. Insome embodiments, the four different chroma QP offset groups aresignaled in the PPS and the encoder can select the appropriate group tobe signaled at the quantization group level. In some embodiments, thechroma QP offsets are explicitly signaled within each quantization groupat the time of encoding.

The choice of a chroma QP offset value is determined by the relativevisual complexities or textures among the luma and chroma components.The quantization groups of the image 1600 are assigned to differentcategories 1611-1614 according to their texture levels. For example,areas that appear as flat across all color components belong to a firstcategory 1611, flat luma areas with high texture color components belongto a second category 1612, high texture luma areas with flat colorinformation belong to a third category 1613, while areas with hightexture across all three components belong to a fourth category 1614.The encoder in some embodiments may create additional subcategories foreach category based on motion and intensity. In some embodiments,additional categorizations are made by taking into account thedifferences between the two chroma components themselves.

These categorizations could then be used to specify different chroma QPoffset sets for the different categories. For example, in someembodiments, the first category 1611 (all flat) is assigned zero ornegative QP offsets. In this scenario, a negative chroma QP offsetallows for improved chroma quality allocation in those regions, sincethe improved chroma quality can be more apparent due to thecharacteristics of all color components. For the second category 1612(flat luma, high textured color information) a larger, positive, QPoffset could be used. In this case, the larger chroma QP allows bettercontrol of chroma components so as to not overwhelm the luma components,while some texture masking from the chroma information could still beexploited to guarantee good subjective quality. For the third category1613 (high textured luma versus flat chroma), some embodiments use alarger negative chroma QP offset to help in guaranteeing slightly bettercolor quality. Some other embodiments use larger positive chroma QPoffset to better exploit luma texture masking. For the fourth category1614 (high texture across all three components), some embodiments use azero or a positive chroma QP offset to better exploit luma texturemasking and to avoid wasting bits for insignificant improvement inchroma subjective quality. It is worth noting that the exact chroma QPoffset values assigned to a quantization group is dependent upon thecorresponding luma QP values for that quantization group. Differentdecisions could be made based on subjective or objective quality andbitrate decision mechanisms in other encoders.

In some embodiments, if a limited number of chroma QP offsets arepermitted or desired (given the likely increase in bit overhead theirspecification would require, apart from the determination of the regionsand their desired QP offset sets), an additional decision is performedbased on the occurrence of each offset set as well as its perceivedsubjective or objective quality impact.

These criteria are then used by some of these embodiments to “prune” thepossible number of chroma QP offset sets signaled within the bit stream,since only the most critical offset sets are now signaled. Regionsclassified in categories that are “pruned” can still be assigned anoffset set that is close enough to the desired values. This is acompromise that could be made, given some subjective or objectiveweighting process, according to which the chroma QP offsets that arespecified are “sub-optimal” for all grouped region types individually,but, given the bit rate limitations, likely provide the bestoverall/joint performance.

For real time applications where a pre-analysis is not possible, someembodiments use a “pre-fixed decision” of QP offsets. In someembodiments, the decision is based on analysis of the data from theprevious pictures that have already been coded. In some embodiments inwhich chroma QP offsets are explicitly signaled for every quantizationgroup, the decision is made on the fly or dynamically for every activelycoded block, based on its selected luma quantization parameter, itsvarious spatial-temporal and color characteristics, as well as codinginformation from past blocks (i.e. what was the bitrate, bitrelationships between luma and chroma, as well as the introduceddistortion of other similar or neighboring blocks coded earlier). Insome embodiments, the luma quantization parameters are jointly derivedwith the chroma QP offsets given the same type of bitrate and contentcharacteristic relationships and conditions.

Some embodiments further improve the selection of the chroma QP offsetsof a current picture by examining its neighboring pictures.Specifically, some embodiments examine how these neighboring pictureshave been coded or will be coded, as well as how these neighboringpictures temporally relate to the current picture and its regions. Forexample, if the current picture is to be coded as a “key” picture (e.g.as an intra or a “periodic” refresh picture), some embodiments wouldencode additional chroma QP offsets in order to improve the chromaquality of the current picture. Conversely, if the current picture is adisposable picture or a less important picture in the coding hierarchy,some embodiments would refrain from assigning additional chroma QPoffsets in a way that results in higher bit rate (or not to useadditional chroma QP offsets at all). For other types of pictures, someembodiments use a more moderate chroma QP offset change to achieve abetter compromise between bit rate and quality.

In some embodiments, different chroma QP offset parameters are specifiedfor different scalability layers such as for resolution, quality,bit-depth, etc. Some embodiments apply additional chroma QP offsets to3D/Multi-view applications where different chroma QP offsets areassigned to different views. For example, stereo masking could beconsidered to allocate and predict the chroma QP offsets as to reduceoverhead and maximize the subjective quality of such a system.

For some embodiments, FIG. 17 conceptually illustrates a process 1700for analyzing different regions of an image and assigning chroma QPoffsets accordingly. The process is performed by a video encoder in someembodiments.

The process starts when it receives (at 1710) a video picture. Thisvideo picture can be a raw image in an uncompressed video stream or adecoded picture from a compressed video bitstream. The process thenidentifies (at 1720) a region in the picture that shares commoncharacteristics that make it suitable for the coding units in the regionto share a common set of chroma QP offset values. For example, someembodiments identify a region that is originally coded in 4:2:0 formatas a region in which higher QP values (and hence positive chroma QPoffset) can be used to reduce bitrate. Conversely, some embodimentsidentify a region that is natively coded in 4:4:4 format as a region inwhich lower QP values (and hence lower or negative QP offset values) areneeded to maintain quality.

The process then analyzes (at 1730) each region's spatial-temporalcharacteristics. In some embodiments, this analysis includes an analysisof the region's texture/variance/activity, format (4:4:4 or 4:2:0,etc.), noise, motion, bit-depth, or other characteristics that mayaffect the relationship between luma and chroma as well as between thetwo chroma components.

Next, the process assigns (at 1740) chroma QP offset values based on theanalysis of the region. In some embodiments, the process firstidentifies the suitable chroma QP value for the region based on theanalysis performed in 1730, then subtracts the chosen luma QP value fromthe identified chroma QP value to obtain the desired overall chroma QPoffset value. The process 1740 in some embodiments also dissolves theoverall chroma QP offset value into chroma QP offset values at variouslevels of the video coding hierarchy (e.g., picture, slice, andquantization group). Some embodiments identify the chroma QP offsetvalues for quantization groups by subtracting chroma QP offset valuesfor higher level syntax elements from the overall chroma QP offsetvalue. In some embodiments, this operation is performed by a ratecontroller as described by reference to FIG. 18 below.

The process then populates (at 1750) the chroma QP offset table with thechroma QP offset values identified for the quantization groups in theregion. The process 1700 also encodes their corresponding index valuesin the quantization groups as discussed in Section I.b above. For someembodiments that specify chroma QP offset values explicitly, the process1700 encodes the chroma QP offset values within the quantization groupsthemselves as discussed in Section I.a above.

The process then determines (at 1760) whether there are more regions inthe picture that remain to be analyzed. If so, the process returns to1720. Otherwise, the process 1700 ends.

III. Video Systems

FIG. 18 illustrates a generic video encoder 1800 (e.g. HEVC encoder) forsome embodiments of the invention. The encoder 1800 receives a videostream from a video source 1805 and produces a compressed, encodedbitstream 1895 to be stored and/or transmitted.

The video encoder includes a transform module 1810, a quantizationmodule 1815, an entropy encoder 1820, an inverse quantization module1825, an inverse transform module 1830, a deblocking filter 1840, asample adaptive offset (SAO) filter 1845, a frame buffer 1850, a ratecontrol module 1835, and a prediction module 1890. The prediction module1890 includes a motion estimation module 1860, a motion compensationmodule 1865, an intra-prediction module 1870, and a mode decision module1880. The video encoder 1800 also includes a video display 1855 in someembodiments.

The quantization module 1815 is a module that uses quantizationparameters to perform quantization on transform coefficients (e.g., DCT)from the transform module 1810. In some embodiments, the transformmodule 1810 can be completely bypassed (such as under thetransform-bypass mode supported by HEVC) so that the quantization module1815 receives image values or image prediction error values withouttransform. The quantization module 1815 applies different QP values fordifferent regions/blocks for each color component. The QP values used bythe quantization module 1815 are also coded as luma QP values and chromaQP offsets into the bitstream 1895. In some embodiments, the QP valuesbeing used by the quantization module 1815 are determined and suppliedby the rate control module 1835.

The rate control module 1835 controls the bitrate of the encoded videobitstream by controlling the QP values that are used by the quantizationmodule 1815 (and the inverse quantization module 1825). In someembodiments, the rate control module 1835 supplies different QP valuesto the quantization module 1815 for different quantization groups. Inorder to identify QP values (for luma and chroma) that are the mostsuitable for quantization (e.g., an optimal balance between quality andbitrate for a given video sequence), the rate control module 1835 insome embodiments performs at least some of the analysis described inSection II above in order to arrive at a luma QP value for each lumaquantization group and a set of chroma QP offset values for each chromaquantization group. In some embodiments, the rate controller 1835 alsouses the analysis for identifying regions and assigning the (luma andchroma) quantization groups.

In some embodiments, the rate controller 1835 dissolves the set ofchroma QP offset values into sets of chroma QP offset values at variouslevels of the video coding hierarchy. In some of these embodiments, atleast some sets of chroma QP offset values are further dissolved intopredicted values between the two chroma components as shown in Equations(1)-(7) above. In some embodiments, lower level QP offset values areidentified by subtracting higher level QP offset values from the overallchroma QP offset values. For example, some embodiments computequantization group level chroma QP offsets as:

QPoffset_quant_group[i]=QPchroma[i]−QPluma−QPoffset_(—)pps[i]−QPoffset_slice[i]  (8)

These sets of chroma QP offset values are then provided to the entropyencoder 1820 to be encoded into the bitstream 1895. In some embodiments,the rate controller 1835 compiles a table of possible quantization grouplevel offsets and provides the compiled table to the entropy encoder1820.

The entropy encoder module 1820 is a module that performs entropyencoding (e.g., CABAC) on the quantized transform coefficients,parameters, and other information, and packages them into the bitstream1895. In some embodiments, the entropy encoder module 1820 receives thechroma QP offset values from the rate controller module 1835 and entropyencodes them into the bitstream. In some embodiments, the entropyencoder 1820 encodes the chroma QP offset values into the PPS area of apicture as a table as described in Section I.b above. In someembodiments, the entropy encoder encodes chroma QP offset values intoindividual quantization groups as described in Section I.a above.

The deblock module 1840 is a loop filter module that improves the visualquality and prediction performance of a video codec system by smoothingthe sharp edges that can form between coding blocks. In someembodiments, the deblock module 1840 uses the overall chroma QP valuecomputed from all of the applicable chroma QP offsets for performing itsdeblocking operations (i.e., by including the chroma QP offsets of thequantization group and of the picture/slice). In some other embodiments,the deblock module 1840 considers only some of the specified chroma QPoffsets, or considers only chroma QP offsets from PPS or slice headers.Some of these embodiments control the deblocking process based on thechroma QP offset values being signals. For example, some embodimentsadjust deblocking parameters in order to compensate for chroma QP offsetvalues. Deblocking may also be performed out of loop and as apost-process. In some embodiments, the overall computed chroma QP valueor some of the chroma QP offsets are used by other types of in-loop orout of loop post processing such as SAO (e.g., the SAO filter 1845),adaptive loop filter (ALF), or noise addition.

FIG. 19 illustrates a generic video decoder 1900 (e.g. HEVC decoder) forsome embodiments of the invention. The decoder 1900 receives a bitstream1905 and decodes it for display by the display module 1965. The decoder1900 includes entropy decoder 1910, an inverse quantization module 1920,an inverse transform module 1930, an intra-prediction module 1950, aninter-prediction module 1980, a deblock module 1960, an SAO module 1970,and a frame buffer 1975.

The entropy decoder module 1910 is a module that performs entropydecoding on the input bitstream and extracts transform coefficients aswell as parameters for other modules in the decoder 1900. Specifically,the chroma quantization information contained in the input bitstream1905 are extracted by the entropy decoder 1910 and passed to the inversequantization module 1920. In some embodiments, the chroma quantizationinformation includes the additional chroma QP offset values that areextracted from a table in a PPS, slice header, or from the quantizationgroups themselves.

The deblock module 1960 of the decoder 1900 performs similar function asthe deblock module 1840 of the encoder 1800. Particularly, the deblockmodule 1960 also uses the final chroma QP value computed from all of theapplicable chroma QP offsets for performing its deblocking operations(i.e., by including the chroma QP offsets of the quantization group andof the picture/slice). In some other embodiments, the deblock module1960 considers only some of the specified chroma QP offsets, orconsiders only chroma QP offsets from PPS or slice headers. In someembodiments, the overall computed chroma QP value or some of the chromaQP offsets are used by other types of in-loop or out of loop postprocessing such as SAO (i.e., the SAO filter 1970), ALF, or noiseaddition.

IV. Electronic System

Many of the above-described features and applications are implemented assoftware processes that are specified as a set of instructions recordedon a computer readable storage medium (also referred to as computerreadable medium). When these instructions are executed by one or morecomputational or processing unit(s) (e.g., one or more processors, coresof processors, or other processing units), they cause the processingunit(s) to perform the actions indicated in the instructions. Examplesof computer readable media include, but are not limited to, CD-ROMs,flash drives, random access memory (RAM) chips, hard drives, erasableprogrammable read only memories (EPROMs), electrically erasableprogrammable read-only memories (EEPROMs), etc. The computer readablemedia does not include carrier waves and electronic signals passingwirelessly or over wired connections.

In this specification, the term “software” is meant to include firmwareresiding in read-only memory or applications stored in magnetic storagewhich can be read into memory for processing by a processor. Also, insome embodiments, multiple software inventions can be implemented assub-parts of a larger program while remaining distinct softwareinventions. In some embodiments, multiple software inventions can alsobe implemented as separate programs. Finally, any combination ofseparate programs that together implement a software invention describedhere is within the scope of the invention. In some embodiments, thesoftware programs, when installed to operate on one or more electronicsystems, define one or more specific machine implementations thatexecute and perform the operations of the software programs.

FIG. 20 conceptually illustrates an electronic system 2000 with whichsome embodiments of the invention are implemented. The electronic system2000 may be a computer (e.g., a desktop computer, personal computer,tablet computer, etc.), phone, PDA, or any other sort of electronicdevice. Such an electronic system includes various types of computerreadable media and interfaces for various other types of computerreadable media. Electronic system 2000 includes a bus 2005, processingunit(s) 2010, a graphics processing unit (GPU) 2015, a system memory2020, a network 2025, a read-only memory 2030, a permanent storagedevice 2035, input devices 2040, and output devices 2045.

The bus 2005 collectively represents all system, peripheral, and chipsetbuses that communicatively connect the numerous internal devices of theelectronic system 2000. For instance, the bus 2005 communicativelyconnects the processing unit(s) 2010 with the read-only memory 2030, theGPU 2015, the system memory 2020, and the permanent storage device 2035.

From these various memory units, the processing unit(s) 2010 retrievesinstructions to execute and data to process in order to execute theprocesses of the invention. The processing unit(s) may be a singleprocessor or a multi-core processor in different embodiments. Someinstructions are passed to and executed by the GPU 2015. The GPU 2015can offload various computations or complement the image processingprovided by the processing unit(s) 2010.

The read-only-memory (ROM) 2030 stores static data and instructions thatare needed by the processing unit(s) 2010 and other modules of theelectronic system. The permanent storage device 2035, on the other hand,is a read-and-write memory device. This device is a non-volatile memoryunit that stores instructions and data even when the electronic system2000 is off. Some embodiments of the invention use a mass-storage device(such as a magnetic or optical disk and its corresponding disk drive) asthe permanent storage device 2035.

Other embodiments use a removable storage device (such as a floppy disk,flash memory device, etc., and its corresponding disk drive) as thepermanent storage device. Like the permanent storage device 2035, thesystem memory 2020 is a read-and-write memory device. However, unlikestorage device 2035, the system memory 2020 is a volatile read-and-writememory, such a random access memory. The system memory 2020 stores someof the instructions and data that the processor needs at runtime. Insome embodiments, the invention's processes are stored in the systemmemory 2020, the permanent storage device 2035, and/or the read-onlymemory 2030. For example, the various memory units include instructionsfor processing multimedia clips in accordance with some embodiments.From these various memory units, the processing unit(s) 2010 retrievesinstructions to execute and data to process in order to execute theprocesses of some embodiments.

The bus 2005 also connects to the input and output devices 2040 and2045. The input devices 2040 enable the user to communicate informationand select commands to the electronic system. The input devices 2040include alphanumeric keyboards and pointing devices (also called “cursorcontrol devices”), cameras (e.g., webcams), microphones or similardevices for receiving voice commands, etc. The output devices 2045display images generated by the electronic system or otherwise outputdata. The output devices 2045 include printers and display devices, suchas cathode ray tubes (CRT) or liquid crystal displays (LCD), as well asspeakers or similar audio output devices. Some embodiments includedevices such as a touchscreen that function as both input and outputdevices.

Finally, as shown in FIG. 20, bus 2005 also couples electronic system2000 to a network 2025 through a network adapter (not shown). In thismanner, the computer can be a part of a network of computers (such as alocal area network (“LAN”), a wide area network (“WAN”), or an Intranet,or a network of networks, such as the Internet. Any or all components ofelectronic system 2000 may be used in conjunction with the invention.

Some embodiments include electronic components, such as microprocessors,storage and memory that store computer program instructions in amachine-readable or computer-readable medium (alternatively referred toas computer-readable storage media, machine-readable media, ormachine-readable storage media). Some examples of such computer-readablemedia include RAM, ROM, read-only compact discs (CD-ROM), recordablecompact discs (CD-R), rewritable compact discs (CD-RW), read-onlydigital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM), a varietyof recordable/rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc.),flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc.),magnetic and/or solid state hard drives, read-only and recordableBlu-Ray® discs, ultra density optical discs, any other optical ormagnetic media, and floppy disks. The computer-readable media may storea computer program that is executable by at least one processing unitand includes sets of instructions for performing various operations.Examples of computer programs or computer code include machine code,such as is produced by a compiler, and files including higher-level codethat are executed by a computer, an electronic component, or amicroprocessor using an interpreter.

While the above discussion primarily refers to microprocessor ormulti-core processors that execute software, some embodiments areperformed by one or more integrated circuits, such as applicationspecific integrated circuits (ASICs) or field programmable gate arrays(FPGAs). In some embodiments, such integrated circuits executeinstructions that are stored on the circuit itself In addition, someembodiments execute software stored in programmable logic devices(PLDs), ROM, or RAM devices.

As used in this specification and any claims of this application, theterms “computer”, “server”, “processor”, and “memory” all refer toelectronic or other technological devices. These terms exclude people orgroups of people. For the purposes of the specification, the termsdisplay or displaying means displaying on an electronic device. As usedin this specification and any claims of this application, the terms“computer readable medium,” “computer readable media,” and “machinereadable medium” are entirely restricted to tangible, physical objectsthat store information in a form that is readable by a computer. Theseterms exclude any wireless signals, wired download signals, and anyother ephemeral signals.

While the invention has been described with reference to numerousspecific details, one of ordinary skill in the art will recognize thatthe invention can be embodied in other specific forms without departingfrom the spirit of the invention. In addition, a number of the figures(including FIGS. 7, 13, and 17) conceptually illustrate processes. Thespecific operations of these processes may not be performed in the exactorder shown and described. The specific operations may not be performedin one continuous series of operations, and different specificoperations may be performed in different embodiments. Furthermore, theprocess could be implemented using several sub-processes, or as part ofa larger macro process. Thus, one of ordinary skill in the art wouldunderstand that the invention is not to be limited by the foregoingillustrative details, but rather is to be defined by the appendedclaims.

What is claimed is:
 1. A method comprising: receiving an array of setsof chroma quantization parameter (QP) offset values from an header of anencoded video picture, wherein an encoded video picture includes aplurality of quantization groups, each quantization group includes atleast one coding unit; selecting one set of chroma QP offset values formthe array of sets of chroma QP offset values for a particularquantization group from the plurality of quantization groups; andcomputing a set of chroma quantization parameters for a coding unit inthe particular quantization group based on the selected set of chroma QPoffset values.
 2. The method of claim 1, wherein computing the set ofchroma quantization parameters comprises adding the selected set ofchroma QP offset values to a luma QP value.
 3. The method of claim 2further comprising identifying the luma QP value for the coding unit. 4.The method of claim 2, wherein the selected set of chroma QP offsetvalues is a first set of chroma QP offset values, the method furthercomprising adding a second set of chroma QP offset values associatedwith the video picture to the luma QP value and the first set of chromaQP offset values.
 5. The method of claim 2, wherein the selected set ofchroma QP offset values is a first set of chroma QP offset values, themethod further comprising adding a second set of chroma QP offset valuesassociated with a slice to the luma QP value and the first set of chromaQP offset values, wherein the slice comprises the particularquantization group.
 6. The method of claim 1, wherein each set of chromaQP offset values in the plurality of sets of chroma QP offset values isassociated with an index, wherein selecting a chroma QP offset valuefrom the plurality comprises using an index to retrieve the selectedchroma QP offset value.
 7. The method of claim 1, wherein the header forthe encoded video picture comprises parameters for identifying a levelin the video coding hierarchy for the quantization group.
 8. The methodof claim 7, wherein a first quantization group in a first video pictureis at a different level of the video coding hierarchy than a secondquantization group in a second video picture.
 9. The method of claim 7,wherein a first quantization group in a first video picture is at adifferent level of a coding quad tree than a second quantization groupin a second video picture.
 10. The method of claim 1, wherein theselected set of chroma QP offset values is for determining chromaquantization parameters for two chroma components, wherein a firstchroma QP offset value for a first chroma component is predicted from asecond offset value for the second chroma component.
 11. A computerreadable storage medium storing a bitstream, the bitstream comprising: atable of chroma quantization parameter (QP) offset values comprising aplurality of entries, each entry including a set of chroma QP offsetvalues, wherein the table is associated with a particular video picture;an index for selecting a set of chroma QP offset values from the arrayof chroma QP offset values for a particular quantization group in theparticular video picture; and a set of coefficients that are quantizedby a set of chroma quantization parameters that are computed based onthe selected set of chroma QP offset values.
 12. The computer readablestorage medium of claim 11, wherein the set of chroma quantizationparameters for the coding unit is computed by adding the selected set ofchroma QP offset values to a luma quantization parameter value.
 13. Thecomputer readable storage medium of claim 11, wherein the selected setof chroma QP offset values is a first set of chroma QP offset values,wherein the bitstream further comprises a second set of chroma QP offsetvalues associated with the video picture, wherein the set of chromaquantization parameters for the coding unit is computed by adding thefirst set of chroma QP offset values and the second set of chroma QPoffset values to a luma quantization parameter value.
 14. The computerreadable storage medium of claim 13, wherein the bitstream furthercomprises a third set of chroma QP offset values associated with a slicethat comprises the particular quantization group, wherein the set ofchroma quantization parameters for the coding unit is computed by addingthe first, second, and third sets of chroma QP offset values to the lumaquantization parameter value.
 15. The computer readable storage mediumof claim 11, wherein the table is encoded in a header area of theparticular video picture.
 16. The computer readable storage medium ofclaim 11, wherein the bitstream further comprises parameters fordefining a quantization group within the particular video picture. 17.The computer readable storage medium of claim 11, wherein each entry inthe table comprises a first chroma QP offset value for a first chromacomponent and a second delta value for predicting a second chroma QPoffset value for a second chroma component.
 18. The computer readablestorage medium of claim 11, wherein each entry in the table comprisesone chroma QP offset value for determining chroma quantizationparameters for two chroma components.
 19. The computer readable storagemedium of claim 11, wherein each successive entry in the table after afirst entry is predicted from a previous entry in the table.